﻿@{
    bool isAdmin = GAE_PI.Models.DBModel.getDBM().isAdmin();
    bool isEleve = GAE_PI.Models.DBModel.getDBM().isEleve();
    string etat = GAE_PI.Models.DBModel.getDBM().getCatalogueState();
}
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <!--jQuery References-->
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>
    <!--Theme-->
    <link href="http://cdn.wijmo.com/themes/sterling/jquery-wijmo.css" rel="stylesheet"
        type="text/css" title="sterling-jqueryui" />
    <!--Wijmo Widgets CSS-->
    <link href="http://cdn.wijmo.com/jquery.wijmo-complete.all.2.0.5.min.css" rel="stylesheet"
        type="text/css" />
    <!--Wijmo Widgets JavaScript-->
    <script src="http://cdn.wijmo.com/jquery.wijmo-open.all.2.0.5.min.js" type="text/javascript"></script>
    <script src="http://cdn.wijmo.com/jquery.wijmo-complete.all.2.0.5.min.js" type="text/javascript"></script>
    <script src="http://cdn.wijmo.com/external/cultures/globalize.cultures.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#dialog-form").dialog({
                autoOpen: false,
                height: 80,
                width: 350,
                modal: true,
                close: function () {
                    allFields.val("").removeClass("ui-state-error");
                },
                resizable: false,
                draggable: false,
                closeText: ""
            });

            $("#supprimer")
			.button()
			.click(function () {
			    $("#dialog-form").dialog("open");
			});
            $("#supprimerNON")
			.button()
			.click(function () {
			    $("#dialog-form").dialog("close");
			});
        });
    </script>
</head>

<body>
    <div class="page">
        <div id="header">
            <div id="title">
                <h1>
                    Gestion d'activités extrascolaires</h1>
            </div>
            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>
            <div id="menucontainer">
                <ul id="nav">
                    <li>@Html.ActionLink("Activités", "ConsulterActivites", "ConsulterActivites")</li>
                    @if (GAE_PI.Models.DBModel.getDBM().isAdmin())
                    {
                        <li>@Html.ActionLink("Editer catalogue", "EditerCatalogue", "EditerCatalogue")</li>
                        <li>@Html.ActionLink("Nouvelle activité", "NouvelleActivite", "NouvelleActivite")</li>
                        <li>@Html.ActionLink("Saisir un catalogue", "NouveauCatalogue", "NouveauCatalogue")</li>
                        <li>@Html.ActionLink("Lister élèves", "ListeEleves", "ListeEleves")</li>
                    }
                    else if (GAE_PI.Models.DBModel.getDBM().isEleve())
                    {
                        <li>@Html.ActionLink("Mes Activités", "MesActivites", "MesActivites")</li>
                    }
                    <li>@Html.Partial("_SelectCatalogue", GAE_PI.Models.DBModel.getDBM())</li>
                </ul>
            </div>
        </div>
        <div id="main">
            @RenderBody()
            <div id="footer">
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#nav").wijmenu();
            $(".button").button();
            $(":input[type='submit']").button();
            $(":input[type='checkbox']").wijcheckbox();
            $(":input[type='radio']").wijradio();
            $(":input[type='text'],:input[type='password'],textarea").not(":wijmo-wijinputnumber").not(":wijmo-wijinputmask").not(":wijmo-wijinputdate").wijtextbox();
            $("select").not(":wijmo-wijcombobox").wijdropdown();
        });
    </script>
</body>
</html>
